import request from '/@/utils/request';

// 查询微门禁列列表
export function listDoor(query?: Object) {
  return request({
    url: '/module/wmj/door/list',
    method: 'get',
    params: query
  })
}

// 查询微门禁列详细
export function getDoor(id?: number) {
  return request({
    url: '/module/wmj/door/' + id,
    method: 'get'
  })
}

// 新增微门禁列
export function addDoor(data?: Object) {
  return request({
    url: '/module/wmj/door',
    method: 'post',
    data
  })
}

// 修改微门禁列
export function updateDoor(data?: Object) {
  return request({
    url: '/module/wmj/door',
    method: 'put',
    data
  })
}

// 删除微门禁列
export function delDoor(id?: number) {
  return request({
    url: '/module/wmj/door/' + id,
    method: 'delete'
  })
}

// 导出微门禁列
export function exportDoor(query?: Object) {
  return request({
    url: '/module/wmj/door/export',
    method: 'get',
    params: query
  })
}

// 重置二维码
export function resetQrCode(data?: Object) {
  return request({
    url: '/module/wmj/door/resetQrCode',
    method: 'post',
    data: data
  })
}

